Skip to content

Fix matmul broadcasting guidance #328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2021
Merged

Fix matmul broadcasting guidance #328

merged 2 commits into from
Nov 15, 2021

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Nov 9, 2021

This PR

  • addresses errors in matmul broadcasting guidance. Namely, only non-matrix dimensions should be broadcasted. Previous guidance suggests that matrix dimensions should also broadcast, but this is not correct (e.g., (10, 2, 1) @ (10, 2, 2) should not work). This is discussed further in PEP 465.

@kgryte kgryte added bug Something isn't working. topic: Linear Algebra Linear algebra. labels Nov 9, 2021
@kgryte kgryte added this to the v2021 milestone Nov 9, 2021
@kgryte kgryte requested a review from asmeurer November 9, 2021 22:13
@kgryte
Copy link
Contributor Author

kgryte commented Nov 15, 2021

Thanks, @asmeurer!

@kgryte kgryte merged commit 02fae2c into main Nov 15, 2021
@kgryte kgryte deleted the matmul-broadcasting branch November 15, 2021 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. topic: Linear Algebra Linear algebra.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants